import request from '../util/axios'

// 保管期限表  ---   获取保管期限表树形结构
export const getTermTree = (idCategory, data) => {
  return request({
    url: `/yuyi-config-boot/api/config/retentionPeriod/tree?idCategory=${idCategory}`,
    method: 'post',
    data
  })
}

// 保管期限表  ---   分页查询保管期限表
export const getTermList = (idCategory, pid, data) => {
  return request({
    url: `/yuyi-config-boot/api/config/retentionPeriod/paging?idCategory=${idCategory}&pid=${pid}`,
    method: 'post',
    data
  })
}

// 保管期限表  ---   新增保管期限表
export const addTermList = (data) => {
  return request({
    url: '/yuyi-config-boot/api/config/retentionPeriod',
    method: 'post',
    data
  })
}

// 保管期限表  ---   编辑保管期限表
export const editTermList = (data) => {
  return request({
    url: '/yuyi-config-boot/api/config/retentionPeriod',
    method: 'put',
    data
  })
}

// 保管期限表  ---   删除保管期限表
export const delTermList = (data) => {
  return request({
    url: '/yuyi-config-boot/api/config/retentionPeriod',
    method: 'delete',
    data
  })
}
